import React,{Component} from "react";

export default class App extends Component {
  shouldComponentUpdate() {
    console.log('update');
  }

  handlerClick1=()=>{
    this.props.onIncrement()
  }

  handlerClick2=()=>{
    this.props.onDecrement()
  }

  render() {
    console.log(this.props);
    return (
      <div>
        <div>{this.props.value.count}</div>
          <button onClick={()=>{this.handlerClick1()}}>increase</button>
          <button onClick={()=>{this.handlerClick2()}}>decrease</button>
      </div>
    )
  }
}

